<template>
  <view class="box">
    <view class="box2">
      <view class="box20">
        <uv-swiper :list="list" indicator indicatorMode="dot" circular height="260rpx"></uv-swiper>
      </view>
      <view class="box21">
        <view class="box2-1">
          <view class="box21-1">
            <image src="/static/logo.png" mode=""></image>
          </view>
          <view class="box21-2">
            数据中心
          </view>
          <view class="box21-3">
            2023-05-17 16:40-17:40
          </view>
        </view>
        <view class="box2-2">
          <view class="box2-21">
            <view class="a">215</view>
            <view class="">今日抢单</view>
          </view>
          <view class="box2-21">
            <view class="a">2156</view>
            <view class="">今日收益</view>
          </view>
        </view>
      </view>
      <!--  -->
      <view class="box22">
        <view class="">业务服务</view>
        <view class="">
          <uv-grid :col="4">
            <uv-grid-item v-for="(item,index) in baseList" :key="index"  @click="setup(item.url)">
              <uv-icon :customStyle="{paddingTop:40+'rpx'}" :name="item.name" :size="30"></uv-icon>
              <text class="grid-text">{{item.title}}</text>
            </uv-grid-item>
          </uv-grid>
        </view>
      </view>
      <!--  -->
    </view>

  </view>
</template>

<script setup>
  import {
    ref
  } from 'vue';
  const list = ref([
    'https://picsum.photos/200/300?1',
    'https://picsum.photos/200/300?2',
    'https://picsum.photos/200/300?3',
  ])
  const baseList = ref(
    [{
      name: '/static/image/接单.png',
      title: '接单台',
      url:'/pages/jiedant/jiedant'
    }, {
      name: '/static/image/订单中心.png',
      title: '订单中心',
      url:'/pages/ddzx/ddzx'
    }, {
      name: '/static/image/个人资料.png',
      title: '个人资料',
      url:'/pages/gerenziliao/gerenziliao'
    }, {
      name: '/static/image/钱包.png',
      title: '钱包',
      url:'/pages/qianbao/qianbao'
    }, {
      name: '/static/image/礼物.png',
      title: '礼物中心',
      url:'/pages/liwuzx/liwuzx'
    }, {
      name: '/static/image/退出登录.png',
      title: '退出登录'
    }]
  )
  const setup = (url) => {
  if (url) {
    uni.navigateTo({
      url: url,
    });
  } else {
    uni.showToast({
      title: "没有要跳转的页面",
      icon: "none",
    });
  }
};
</script>

<style lang="scss">
  @import url("./zhuye.css");
</style>